/*
 * @Description: 竣工收尾工作计划接口
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2022-01-18 17:51:10
 * @LastEditTime: 2022-12-23 16:53:48
 * @FilePath: \cscec-pms-admin\src\api\construction\constructionCompleted.js
 */
import request from '@/utils/request2'
import { projectApiUrl } from '@/api/config'
const api = {
  list: {
    queryScheduleCompletionPlanTree: projectApiUrl + '/schedule-completion/query-schedule-completion-plan-tree',
    createCompletionPlan: projectApiUrl + '/schedule-completion/create-completion-plan',
    deleteCompletionPlan: projectApiUrl + '/schedule-completion/delete-completion-plan',
    wbstemplate: projectApiUrl + '/construction/wbstemplate',
  },
  view: {
    completionPlanDetail: projectApiUrl + '/schedule-completion/completion-plan-detail',
    doubleNetworkPictureQuery: projectApiUrl + '/schedule-completion/double-network-picture-query',
    createSiblingWorkPack: projectApiUrl + '/schedule-completion/create-sibling-work-pack',
    createChildWorkPack: projectApiUrl + '/schedule-completion/create-child-work-pack',
    siblingWork: projectApiUrl + '/schedule-completion/sibling-work',
    createChildWork: projectApiUrl + '/schedule-completion/create-child-work',
    moveUp: projectApiUrl + '/schedule-completion/move-up',
    moveDown: projectApiUrl + '/schedule-completion/move-down',
    upgradeWorkPack: projectApiUrl + '/schedule-completion/upgrade-work-pack',
    downgradeWorkPack: projectApiUrl + '/schedule-completion/downgrade-work-pack',
    editWork: projectApiUrl + '/schedule-completion/edit-work',
    editWorkPack: projectApiUrl + '/schedule-completion/edit-work-pack',
    removeWork: projectApiUrl + '/schedule-completion/remove-work',
    removeWorkPack: projectApiUrl + '/schedule-completion/remove-work-pack',
    completionPlanSubmitApproval: projectApiUrl + '/schedule-completion/completion-plan-submit-approval',
    doubleNetworkPictureUpload: projectApiUrl + '/schedule-completion/double-network-picture-upload',
    importTemplate: projectApiUrl + '/schedule/import-template',
    directlyDutyPersonSelectQuery: projectApiUrl + '/schedule/directly-duty-person-select-query',
    queryFrontTask: projectApiUrl + '/schedule-completion-front-task/query-front-task',
    queryFrontTaskTree: projectApiUrl + '/schedule-completion-front-task/query-front-task-tree',
    createFrontTask: projectApiUrl + '/schedule-completion-front-task/create-front-task',
    editFrontTask: projectApiUrl + '/schedule-completion-front-task/edit-front-task',
    deleteFrontTask: projectApiUrl + '/schedule-completion-front-task/delete-front-task',
  },
  implementationManagement: {
    implementationKanbanShow: projectApiUrl + '/schedule-completion/implementation-kanban-show',
    completionPlanHistoryAdjust: projectApiUrl + '/schedule-completion/completion-plan-history-adjust',
    onTimeCompleteRateDetail: projectApiUrl + '/schedule-completion/on-time-complete-rate-detail',
    completeRateDetail: projectApiUrl + '/schedule-completion/complete-rate-detail',
    nodeList: projectApiUrl + '/schedule-completion/node-list',
    completionPlanCalendar: projectApiUrl + '/schedule-completion/completion-plan-calendar',
    workWithResult: projectApiUrl + '/schedule-completion/work-with-result',
    nodeMaintainFile: projectApiUrl + '/schedule-completion/node-maintain-file',
    nodeMaintain: projectApiUrl + '/schedule-completion/node-maintain',
    implementationKanbanHidden: projectApiUrl + '/schedule-completion/implementation-kanban-hidden',
    masterPlanDetail: projectApiUrl + '/schedule-completion/completion-plan-detail',
    queryCompletionPlanNotifyDetail: projectApiUrl + '/completion-plan-notify/query-completion-plan-notify-detail',
    dealCompletionPlanNotify: projectApiUrl + '/completion-plan-notify/deal-completion-plan-notify'

  }
}
// 列表接口
const list = {
  /**
    * @description: 获取项目业态
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  wbstemplate: data => {
    return request({
      url: api.list.wbstemplate,
      method: 'get',
      params: data
    })
  },
  /**
   * @description: 获取竣工收尾计划列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryScheduleCompletionPlanTree: data => {
    return request({
      url: api.list.queryScheduleCompletionPlanTree,
      method: 'post',
      data
    })
  },
  /**
   * @description: 新增计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  createCompletionPlan: data => {
    return request({
      url: api.list.createCompletionPlan,
      method: 'post',
      data
    })
  },
  /**
   * @description: 删除计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  deleteCompletionPlan: data => {
    return request({
      url: api.list.deleteCompletionPlan,
      method: 'post',
      data
    })
  }

}
const view = {
  /**
   * @description: 获取竣工收尾计划详情
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  completionPlanDetail: data => {
    return request({
      url: `${api.view.completionPlanDetail}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取双代号网络图附件
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  doubleNetworkPictureQuery: data => {
    return request({
      url: `${api.view.doubleNetworkPictureQuery}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 新增同级阶段/类别
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  createSiblingWorkPack: data => {
    return request({
      url: api.view.createSiblingWorkPack,
      method: 'post',
      data
    })
  },
  /**
   * @description: 新增下级阶段/类别
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  createChildWorkPack: data => {
    return request({
      url: api.view.createChildWorkPack,
      method: 'post',
      data
    })
  },
  /**
   * @description: 新增同级业务事项
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  siblingWork: data => {
    return request({
      url: api.view.siblingWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 新增下级业务事项
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  createChildWork: data => {
    return request({
      url: api.view.createChildWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 上移
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  moveUp: data => {
    return request({
      url: api.view.moveUp,
      method: 'post',
      data
    })
  },
  /**
   * @description: 下移
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  moveDown: data => {
    return request({
      url: api.view.moveDown,
      method: 'post',
      data
    })
  },
  /**
   * @description: 升级
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  upgradeWorkPack: data => {
    return request({
      url: api.view.upgradeWorkPack,
      method: 'post',
      data
    })
  },
  /**
   * @description: 降级
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  downgradeWorkPack: data => {
    return request({
      url: api.view.downgradeWorkPack,
      method: 'post',
      data
    })
  },
  /**
   * @description: 编辑业务事项
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  editWork: data => {
    return request({
      url: api.view.editWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 编辑阶段/类别
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  editWorkPack: data => {
    return request({
      url: api.view.editWorkPack,
      method: 'post',
      data
    })
  },
  /**
   * @description: 删除业务事项
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  removeWork: data => {
    return request({
      url: api.view.removeWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 删除阶段/类别
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  removeWorkPack: data => {
    return request({
      url: api.view.removeWorkPack,
      method: 'post',
      data
    })
  },
  /**
   * @description: 竣工收尾计划提交审批
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  completionPlanSubmitApproval: data => {
    return request({
      url: api.view.completionPlanSubmitApproval,
      method: 'post',
      data
    })
  },
  /**
   * @description: 双代号网络图附件上传
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  doubleNetworkPictureUpload: data => {
    return request({
      url: api.view.doubleNetworkPictureUpload,
      method: 'post',
      data
    })
  },
  /**
   * @description: 导入模板
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  importTemplate: data => {
    return request({
      url: api.view.importTemplate,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取直接责任人
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  directlyDutyPersonSelectQuery: data => {
    return request({
      url: api.view.directlyDutyPersonSelectQuery,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取前置任务列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryFrontTask: data => {
    return request({
      url: `${api.view.queryFrontTask}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取前置任务节点名称树
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryFrontTaskTree: data => {
    return request({
      url: api.view.queryFrontTaskTree,
      method: 'post',
      data
    })
  },
  /**
   * @description: 新增前置任务
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  createFrontTask: data => {
    return request({
      url: api.view.createFrontTask,
      method: 'post',
      data
    })
  },
  /**
   * @description: 编辑前置任务
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  editFrontTask: data => {
    return request({
      url: api.view.editFrontTask,
      method: 'post',
      data
    })
  },
}
const implementationManagement = {
  /**
   * @description: 获取竣工收尾计划实施管理看板显示数据
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  implementationKanbanShow: data => {
    return request({
      url: `${api.implementationManagement.implementationKanbanShow}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取竣工收尾工作计划历史调整记录
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  completionPlanHistoryAdjust: data => {
    return request({
      url: `${api.implementationManagement.completionPlanHistoryAdjust}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取节点按时完成率
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  onTimeCompleteRateDetail: data => {
    return request({
      url: `${api.implementationManagement.onTimeCompleteRateDetail}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取节点完成率
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  completeRateDetail: data => {
    return request({
      url: `${api.implementationManagement.completeRateDetail}/${data}`,
      method: 'get'
    })
  },
  /**
    * @description: 获取点信息列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  nodeList: data => {
    return request({
      url: api.implementationManagement.nodeList,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取竣工收尾计划日历数据
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  completionPlanCalendar: data => {
    return request({
      url: api.implementationManagement.completionPlanCalendar,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取工作详情和节点维护信息(竣工)
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  workWithResult: data => {
    return request({
      url: `${api.implementationManagement.workWithResult}/${data}`,
      method: 'get'
    })
  },
  /**
  * @description: 获取节点完成率
  * @param {Object} data 接口参数
  * @return {Promise} 接口Promise
  */
  nodeMaintainFile: data => {
    return request({
      url: api.implementationManagement.nodeMaintainFile,
      method: 'post',
      data
    })
  },
  /**
   * @description: 节点维护
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  nodeMaintain: data => {
    return request({
      url: api.implementationManagement.nodeMaintain,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取竣工收尾计划看板隐藏数据
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  implementationKanbanHidden: data => {
    return request({
      url: `${api.implementationManagement.implementationKanbanHidden}/${data}`,
      method: 'get'
    })
  },
  /**
    * @description: 获取施工进度总计划详情
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  masterPlanDetail: data => {
    return request({
      url: `${api.implementationManagement.masterPlanDetail}/${data}`,
      method: 'get'
    })
  },
  /**
    * @description: 获取竣工收尾计划业务待办详情
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  queryCompletionPlanNotifyDetail: data => {
    return request({
      url: `${api.implementationManagement.queryCompletionPlanNotifyDetail}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 竣工收尾计划业务待办处理
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  dealCompletionPlanNotify: data => {
    return request({
      url: api.implementationManagement.dealCompletionPlanNotify,
      method: 'post',
      data
    })
  },
}
export {
  list,
  view,
  implementationManagement
}